package com.example.firstopengl;

import android.app.Activity;
import android.opengl.GLSurfaceView;
//import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends Activity {

    private GLSurfaceView glSurfaceView;
    private boolean  renderset = false;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        glSurfaceView = new GLSurfaceView(this);
        glSurfaceView.setEGLContextClientVersion(2);
        glSurfaceView.setRenderer(new AirHotkeyRender(this));
        setContentView(glSurfaceView);
        renderset = true;

//        glSurfaceView.setRenderer(new );
    }

    @Override
    protected void onPause() {
        super.onPause();
        if(glSurfaceView != null){
            glSurfaceView.onPause();
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        if(glSurfaceView != null){
            glSurfaceView.onResume();
        }
    }


}
